<%@page import="net.sf.json.JSONObject"%>
<%@page import="controller.JsonRequestCtrl"%>
<%@page import="util.JsonUtil"%>
<%@ page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8"%>

<%
    JsonRequestCtrl jsonReqeustCtrl = new JsonRequestCtrl();

    if (request.getParameterMap().containsKey("r")) {
        String req = (String) request.getParameter("r");
        //relay to JSON request controller
        JSONObject res = jsonReqeustCtrl.processDumpUserRequest(req);
        
        out.write(res.toString(1));
    } else {
        out.write(JsonUtil.newJsonErrorResponse("missing parameter r").toString(1));
        out.flush();
    }
%>